{* Smarty *}
{*
 *  This file is part of Urd.
 *
 *  Urd is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 3 of the License, or
 *  (at your option) any later version.
 *  Urd is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program. See the file "COPYING". If it does not
 *  exist, see <http://www.gnu.org/licenses/>.
 *
 * $LastChangedDate: 2008-06-14 11:01:35 +0200 (Sat, 14 Jun 2008) $
 * $Rev: 1161 $
 * $Author: styck $
 * $Id: ajax_showstatus.tpl 1161 2008-06-14 09:01:35Z styck $
 *}
<div id="quickmenuitem_close" class="quickmenuitem">
<a onclick="javascript:CloseQuickMenu();" class="buttonlike qmclose"><img src="{$IMGDIR}/icon_purge.png" alt="" width="16" height="16" /></a>
</div>

{* Ajax page, doesn't need a head/foot tpl *}
{counter start=1 skip=1 assign="offset"}
{foreach key=link item=item from=$items}
<div id="quickmenuitem_{$offset}" class="quickmenuitem">
{assign var="img" value="clear.png"}

{* Picture? *}
{if $item->id == 'setsearch'} {assign var="img" value="search.png"}{/if}
{if $item->id == 'setshowesi'} {assign var="img" value="view.png"}{/if}
{if $item->id == 'seteditesi'} {assign var="img" value="edit.png"}{/if}
{if $item->id == 'setguessesi'} {assign var="img" value="guessesi.png"}{/if}
{if $item->id == 'setbasketguessesi'} {assign var="img" value="basketguessesi.png"}{/if}
{if $item->id == 'setguessesisafe'} {assign var="img" value="guessesi.png"}{/if}
{if $item->id == 'setpreviewnfo'} {assign var="img" value="nfo.png"}{/if}
{if $item->id == 'setpreviewimg'} {assign var="img" value="viewimg.png"}{/if}
{if $item->id == 'setpreviewnzb'} {assign var="img" value="getnzb.png"}{/if}

{* Action? *}
{if $item->type == 'quickmenu'}
<img src="{$IMGDIR}/{$img}" onclick="javascript:ShowQuickMenu('{$item->id}','{$subject}', {$srctype},event);" class="buttonlike" {popup text=$item->name|escape:htmlall} alt="" height="39" width="40"/>
{/if}
{if $item->type == 'quickdisplay'}
<img src="{$IMGDIR}/{$img}" onclick="javascript:ShowQuickDisplay('{$item->id}','{$subject}',event, {$srctype});" class="buttonlike" {popup text=$item->name|escape:htmlall} alt="" height="39" width="40"/>
{/if}
{if $item->type == 'newpage'}
<img src="{$IMGDIR}/{$img}" onclick="javascript:document.location.href='{$item->extra}'" class="buttonlike" {popup text=$item->name|escape:htmlall} alt="" height="39" width="40"/>
{/if}
{if $item->type == 'searchbutton'}
<img src="{$IMGDIR}/{$item->extra.image_url}" onclick="javascript:SearchButton('{$item->extra.search_url}','{$item->extra.name|escape:htmlall}');CloseQuickMenu();" class="buttonlike" {popup text=$item->name|escape:htmlall} alt="" height="39" width="40"/>
{/if}
{if $item->type == 'nfopreview' || $item->type == 'imgpreview'|| $item->type == 'nzbpreview' }
<img src="{$IMGDIR}/{$img}" onclick="javascript:select_preview('{$item->extra.binaryID}','{$item->extra.groupID}');CloseQuickMenu();" class="buttonlike" {popup text=$item->name|escape:htmlall} alt="" height="39" width="40"/>
{/if}

{if $item->type == 'guessextsetinfosafe'}
<img src="{$IMGDIR}/{$img}" onclick="javascript:GuessExtSetInfoSafe('{$subject}', {$srctype})" class="buttonlike" {popup text=$item->name|escape:htmlall} alt="" height="39" width="40"/>
{/if}
{if $item->type == 'guessbasketextsetinfo'}
<img src="{$IMGDIR}/{$img}" onclick="javascript:GuessBasketExtSetInfo('{$subject}', {$srctype})" class="buttonlike" {popup text=$item->name|escape:htmlall} alt="" height="39" width="40"/>
{/if}
{if $item->type == 'guessextsetinfo'}
<img src="{$IMGDIR}/{$img}" onclick="javascript:GuessExtSetInfo('{$subject}', {$srctype})" class="buttonlike" {popup text=$item->name|escape:htmlall} alt="" height="39" width="40"/>
{/if}

</div>
{counter}
{/foreach}
{assign var="totalitems" value="`$offset-1`"}
<input type="hidden" id="nrofquickmenuitems" value="{$totalitems}"/>
{if $message !== ''}
<h2>{$message}</h2>
{/if}
